package cn.jbolt.ai.app.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.util.Date;

/**
 * AI应用配置表
 */
@TableName("ja_ai_app_config") // 指定数据库表名
public class AiAppConfig implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(name = "linkId", description = "关联ID")
    @TableField("link_id")
    private Long linkId;

    @Schema(name = "linkType", description = "关联类型,app,session,node")
    @TableField("link_type")
    private String linkType;



    @Schema(name = "configValue", description = "配置值,这是一个json串")
    @TableField("config_value")
    private String configValue;

    @Schema(name = "createTime", description = "创建时间")
    @JsonFormat(locale = "zh", pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    //以下是非数据库字段
    @TableField(exist = false)
    private String configValueJson;

    @TableField(exist = false)
    private String configKey;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getLinkId() {
        return linkId;
    }

    public void setLinkId(Long linkId) {
        this.linkId = linkId;
    }


    public String getConfigValue() {
        return configValue;
    }

    public void setConfigValue(String configValue) {
        this.configValue = configValue;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getLinkType() {
        return linkType;
    }

    public void setLinkType(String linkType) {
        this.linkType = linkType;
    }

    public String getConfigValueJson() {
        return configValueJson;
    }

    public void setConfigValueJson(String configValueJson) {
        this.configValueJson = configValueJson;
    }

    public String getConfigKey() {
        return configKey;
    }

    public void setConfigKey(String configKey) {
        this.configKey = configKey;
    }
}
